import {getData, postData, putData, deleteData} from '../api'

// 根据邮箱发送验证码
export const sendEmailCode = async (email:string) => {
    let res = await getData(`/userprofile/${email}`)
    return res
}

// 根据id获取用户信息
export const getUserById = async (email:string) => {
    let res = await getData(`/userprofile/${email}`)
    return res
}

// 根据id更新用户信息
export const updateUserById = async (id:number, data:any) => {
    let res = await putData(`/userprofile/${id}`, data)
    return res
}

// 根据id删除用户信息
export const deleteUserById = async (id:number) => {
    let res = await deleteData(`/userprofile/${id}`)
    return res
}

